// 1 1 2 3 5 8 13 21
function foo(n) {
    if (n == 1 || n == 2) {  //或n<=2
        return 1;
    }
    return foo(n - 1) + foo(n - 2)
}

foo(8)
console.log(foo(8));
